/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2023-11-24
 * Time: 20:09
 */

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        String rightUserName = "zhangsan";
        String rightPassword = "123456";

        for (int i = 0; i < 2; i++) {
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入用户名: ");
            String username = sc.next();
            System.out.println("请输入密码");
            String password = sc.next();

            if (username.equals(rightUserName) && password.equals(rightPassword)) {
                System.out.println("登录成功");
            } else {
                System.out.println("登录失败");
            }
        }

    }
}
